home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-05-25 | 4.3 KB | 97 lines | [TEXT/MPS ] |
- 05/25/95
-
- The tools in this folder may make it easier to build declaration ROM images and then
- download those images to a ROM programmer. The tools in this folder are described below.
-
-
-
- CHANGES TO ROM BUILD/DOWNLOAD FOLDER
- ------------------------------------
-
- 05/25/95: • Resubmitted to developer CD (9/16/92 version off CD somehow?)
- • changed version of ROM Build/Download folder from 3.2.3 to 3.2.4 <mb>
-
- 10/29/92: • Changed -Read Me memo: Further clarified the need to run the CRCPatch tool on the
- full-sized (i.e. FINAL) ROM image. This is described in the CRCPatch section below. <mb>
-
- 09/16/92: • The -Read Me memo changed: I added the calling syntax, further clarified the need to
- run the tools: CRCPatch first, then Data. <mb>
- • Incorporated bug fixes in CRCPatch.c, Data.c that caused potential bus errors in
- 32 bit mode. <mb>
- • Incorporated fix in CRCCalc.a to properly calculate CRCs in ROMs greater than 64K in
- size. Thanks to PG! <mb>
-
- 07/31/92: • The -Read Me memo has been simplified, because the Designing Cards and Drivers book
- contains the Slot Manager and ROM concepts that were in the earlier memo. <mb>
-
-
-
- TOOL DESCRIPTIONS/NOTES
- -----------------------
-
-
-
- 1. CRCPATCH
-
- Calling syntax from the MPW shell: CRCPatch filename
-
- Run the CRCPatch tool after assembling and linking your declaration ROM source files, so that code
- segment 1 is an image of the declaration ROM. (There will be a code 0 segment, but this tool
- doesn't look at it, and the "Data" tool explained below removes it for you).
-
- The tool calculates the CRC value of code segment 1 of the specified file, and patches the CRC
- value into the proper position in code segment 1 (where it would be in the format header block).
-
- CRCPatch calculates the crc value using this algorithm:
-
- Start pointer at bottom of ROM (top of ROM - length)
- Initialize sum to 0 (sum will be the CRC value)
- @1 Rotate sum left by one bit (with ROL.L #1 instruction)
- If pointer is pointing to CRC field in format header, goto @2 (i.e. don't count CRC field)
- Get a byte
- Add byte to sum
- @2 Increment pointer to next data byte
- Goto @1 until done
-
- IMPORTANT: You MUST run CRCPatch on the "real" ROM image (which should be your CODE 1 resource after
- assembling and linking). That is, your CODE 1 resource must be the same size as your final ROM, and
- must contain ALL the data (including padding zeroes between the format header block and the lower
- part of your ROM). CRCPatch will stamp the CRC value into the proper space in your format block.
-
- We had a situation where a developer was using a large ROM (64K) but only assembled and linked a
- smaller ROM (3K), figuring he could fill his ROM programmer's buffer with zeroes and overlay the
- directory, sResource structures, and format header information into the correct places in the buffer.
-
- But, in his case, the CRCPatch Tool will only do about 3,000 rotates in its CRC calculation loop
- (because it gets its size from the size of the CODE 1 resource), whereas the Macintosh startup code
- will do 64K rotates when it scans the card (because the ROMLength will be 64K). And the CRC value
- the startup code generates won't match that of the ROM - resulting in an smBLFieldBad error -309 (bad
- bytelanes value, which is returned for both bad bytelanes values and bad checksums).
-
-
-
- 2. DATA TOOL
-
- Calling syntax from the MPW shell: Data ResourceFileName DataFileName
-
- The Data tool opens ResourceFileName, strips off the code 0 segment, and puts the code 1 segment in a
- file named DataFileName. The resulting data file can then be downloaded to a ROM programmer.
- Run the Data tool after doing the CRCPatch.
-
- A typical build sequence would be something like:
-
- BuildProgram myDeclROM # Assemble, link declaration ROM. The resulting resource
- # file will contain code segments 0 and 1.
- CRCPatch myDeclROM # Calculate CRC on code segment 1 and patch value into code 1.
- Data myDeclROM Final.ROM.Image # Copy code segment 1 into data file, creating final ROM image.
-
-
-
- 3. TJS COMM APPLICATION
-
- The tjs comm application is a rudimentary data comm program. It can be used to download a
- data file to a ROM programmer. The letters TJS are the initials of the engineer who wrote the program.
-
-
- END
-